{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "initial_id",
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    ""
   ]
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:42:12.288858Z",
     "start_time": "2025-09-26T08:42:12.280660Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import numpy as np\n",
    "from astropy.utils.metadata.utils import dtype\n",
    "\n",
    "arrld = np.array([1,2,3,4,5])\n",
    "arrld2=np.array([[1,2,3],[4,5,6]])\n",
    "arrld\n",
    "arrld2"
   ],
   "id": "db77579b0bc56c82",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1, 2, 3],\n",
       "       [4, 5, 6]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:58:13.734521Z",
     "start_time": "2025-09-26T08:58:13.727291Z"
    }
   },
   "cell_type": "code",
   "source": "np.arange(1,20,5)",
   "id": "37daa102a6f900f8",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1,  6, 11, 16])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 15
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:43:33.492295Z",
     "start_time": "2025-09-26T08:43:33.467558Z"
    }
   },
   "cell_type": "code",
   "source": "np.zeros((3,3))",
   "id": "29a6230314553b75",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0., 0., 0.],\n",
       "       [0., 0., 0.],\n",
       "       [0., 0., 0.]])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 13
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:45:00.022922Z",
     "start_time": "2025-09-26T08:45:00.014113Z"
    }
   },
   "cell_type": "code",
   "source": "np.empty((3,3))",
   "id": "aa42be7752852b86",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0., 0., 0.],\n",
       "       [0., 0., 0.],\n",
       "       [0., 0., 0.]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 14
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T08:59:36.413026Z",
     "start_time": "2025-09-26T08:59:36.403773Z"
    }
   },
   "cell_type": "code",
   "source": "np.linspace(1,20,3)",
   "id": "f4a0c139f08b2af1",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1. , 10.5, 20. ])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T09:10:19.010221Z",
     "start_time": "2025-09-26T09:10:19.002967Z"
    }
   },
   "cell_type": "code",
   "source": [
    "aa = np.array([1,2,3],dtype=np.int32)\n",
    "aa.dtype.name"
   ],
   "id": "2b7eeb376c1eb7da",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'int32'"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 25
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T09:14:49.281999Z",
     "start_time": "2025-09-26T09:14:49.273999Z"
    }
   },
   "cell_type": "code",
   "source": [
    "data = np.array([[1,2,3],[4,5,6]])\n",
    "f_data = data.astype(np.float32)\n",
    "f_data.dtype.name"
   ],
   "id": "c3f978a535f23350",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'float32'"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 28
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T09:15:52.055413Z",
     "start_time": "2025-09-26T09:15:52.048818Z"
    }
   },
   "cell_type": "code",
   "source": [
    "f_data = np.array([1.2,2.3,3.4])\n",
    "i_data= f_data.astype(np.int32)\n",
    "i_data"
   ],
   "id": "55140d523792d859",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3], dtype=int32)"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 31
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-09-26T09:18:20.180545Z",
     "start_time": "2025-09-26T09:18:20.174090Z"
    }
   },
   "cell_type": "code",
   "source": [
    "str_data = np.array(['1','2','3'])\n",
    "i_data = str_data.astype(np.int32)\n",
    "i_data"
   ],
   "id": "5095c30ac73da723",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 2, 3], dtype=int32)"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 34
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
